<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
  {{message}}
  <cpn1></cpn1>
  <cpn2></cpn2>
</div>
<script type="text/x-template" id="cpn1">
<div>
  <h2>{{title}}</h2>
  <p>阿斯顿法国热</p>
</div>
</script>
<template id="cpn2">
  <div>
    <h2>标题2</h2>
    <p>规划法大大的双方各得</p>
  </div>
</template>
<script src="../js/vue.js"></script>
<script>
  Vue.component('cpn1',{
    template:`#cpn1`,
    data() {
      return {
        title:'大厦'
      }
    }
  })
  Vue.component('cpn2',{
    template: `#cpn2`
  })
  let app = new Vue({
    el:'#app',
    data:{
      message:'123',
      name:'321',
    }
  })
</script>
</body>
</html>